home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / NPP.PAK / NPDOC.CPP < prev    next >
C/C++ Source or Header  |  1997-05-06  |  2KB  |  82 lines

  1. // npdoc.cpp : implementation of the CNotepadDoc class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12. //
  13.  
  14. #include "stdafx.h"
  15. #include "np.h"
  16.  
  17. #include "npdoc.h"
  18.  
  19. #ifdef _DEBUG
  20. #undef THIS_FILE
  21. static char BASED_CODE THIS_FILE[] = __FILE__;
  22. #endif
  23.  
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CNotepadDoc
  26.  
  27. IMPLEMENT_DYNCREATE(CNotepadDoc, CDocument)
  28.  
  29. BEGIN_MESSAGE_MAP(CNotepadDoc, CDocument)
  30.     //{{AFX_MSG_MAP(CNotepadDoc)
  31.     ON_COMMAND(ID_FILE_SEND_MAIL, OnFileSendMail)
  32.     ON_UPDATE_COMMAND_UI(ID_FILE_SEND_MAIL, OnUpdateFileSendMail)
  33.     //}}AFX_MSG_MAP
  34. END_MESSAGE_MAP()
  35.  
  36. /////////////////////////////////////////////////////////////////////////////
  37. // CNotepadDoc construction/destruction
  38.  
  39. CNotepadDoc::CNotepadDoc()
  40. {
  41. }
  42.  
  43. CNotepadDoc::~CNotepadDoc()
  44. {
  45. }
  46.  
  47. BOOL CNotepadDoc::OnNewDocument()
  48. {
  49.     if (!CDocument::OnNewDocument())
  50.         return FALSE;
  51.  
  52.     ((CEditView*)m_viewList.GetHead())->SetWindowText(NULL);
  53.  
  54.     return TRUE;
  55. }
  56.  
  57. /////////////////////////////////////////////////////////////////////////////
  58. // CNotepadDoc serialization
  59.  
  60. void CNotepadDoc::Serialize(CArchive& ar)
  61. {
  62.     ((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);
  63. }
  64.  
  65. /////////////////////////////////////////////////////////////////////////////
  66. // CNotepadDoc diagnostics
  67.  
  68. #ifdef _DEBUG
  69. void CNotepadDoc::AssertValid() const
  70. {
  71.     CDocument::AssertValid();
  72. }
  73.  
  74. void CNotepadDoc::Dump(CDumpContext& dc) const
  75. {
  76.     CDocument::Dump(dc);
  77. }
  78. #endif //_DEBUG
  79.  
  80. /////////////////////////////////////////////////////////////////////////////
  81. // CNotepadDoc commands
  82.